import * as constants from './constants';
import { fromJS } from 'immutable';

const defaultState = fromJS({
	topicList: [],
});

export default (state = defaultState, action) => {
	switch(action.type) {
		// case constants.SEARCH_FOCUS:
		// 	return state.set('focused', true);
		case constants.GET_TOPICS:
			return state.merge({
				topicList: action.data,
			});
		default:
			return state;
	}
}